<template>
  <div class="cashboxUninstall">
    <basic-container>
      <avue-crud
        ref="crud"
        :option="option"
        :table-loading="listLoading"
        :data="list"
        :page.sync="page"
        @search-change="handleFilter"
        @selection-change="selectionChange"
        @on-load="getList">
      </avue-crud>
    </basic-container>
  </div>

</template>

<script>
  import {getForm, postForm} from '@/api/gen/gen'
  import {mapGetters} from 'vuex';
  import {tableOption,getCashboxUninstallList} from '../../../api/subwayRat/reportDifferences/cashboxUninstall';
  export default {
    name: 'cashboxUninstall',
    data() {
      return {
        option: tableOption,
        listLoading: true,
        searchForm:{
          lineCode:'',
          stationCode:''
        },
        page: {
          total: 0, // 总页数
          currentPage: 1, // 当前页数
          pageSize: 20, // 每页显示多少条,
          isAsc: false// 是否倒序
        },
        list : []
      }
    },
    computed: {
      ...mapGetters(['permissions'])
    },
    watch: {
    },
    created() {
    },
    methods: {
      getList() {
        this.listLoading = true;
        this.searchForm.userCode = this.$store.getters.userInfo.userCode;
        getCashboxUninstallList(this.searchForm).then((response)=>{
          this.list = response.data.data;
          this.listLoading = false;
          this.page.total=response.data.total;
        });
      },
      selectionChange(list){
      },
      handleFilter(params, done) {
        Object.assign(this.searchForm,params);
        this.getList()
        done()
      }
    }
  }
</script>
<style lang="scss">
  .cashboxUninstall {
    height: 100%;

    &__tree {
      padding-top: 3px;
      padding-right: 20px;
    }

    &__main {
      .el-card__body {
        padding-top: 0;
      }
    }
  }
</style>
